/**************************************************
beginning of licensing agreement
Microsoft Public License (Ms-PL)

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. 
end of licensing agreement
**************************************************/
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.2032
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

// 
// This source code was auto-generated by xsd, Version=1.1.4322.2032.
// 
namespace PssdiagTraceSchema.Namespace {
    using System;
    using System.Data;
    using System.Xml;
    using System.Runtime.Serialization;
    
    
    [Serializable()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Diagnostics.DebuggerStepThrough()]
    [System.ComponentModel.ToolboxItem(true)]
    public class dsProfiler : DataSet {
        
        private ProfilerCollectorDataTable tableProfilerCollector;
        
        private EventsDataTable tableEvents;
        
        private EventTypeDataTable tableEventType;
        
        private EventDataTable tableEvent;
        
        private DataRelation relationEventType_Event;
        
        private DataRelation relationEvents_EventType;
        
        private DataRelation relationProfilerCollector_Events;
        
        public dsProfiler() {
            this.InitClass();
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        protected dsProfiler(SerializationInfo info, StreamingContext context) {
            string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
            if ((strSchema != null)) {
                DataSet ds = new DataSet();
                ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
                if ((ds.Tables["ProfilerCollector"] != null)) {
                    this.Tables.Add(new ProfilerCollectorDataTable(ds.Tables["ProfilerCollector"]));
                }
                if ((ds.Tables["Events"] != null)) {
                    this.Tables.Add(new EventsDataTable(ds.Tables["Events"]));
                }
                if ((ds.Tables["EventType"] != null)) {
                    this.Tables.Add(new EventTypeDataTable(ds.Tables["EventType"]));
                }
                if ((ds.Tables["Event"] != null)) {
                    this.Tables.Add(new EventDataTable(ds.Tables["Event"]));
                }
                this.DataSetName = ds.DataSetName;
                this.Prefix = ds.Prefix;
                this.Namespace = ds.Namespace;
                this.Locale = ds.Locale;
                this.CaseSensitive = ds.CaseSensitive;
                this.EnforceConstraints = ds.EnforceConstraints;
                this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
                this.InitVars();
            }
            else {
                this.InitClass();
            }
            this.GetSerializationData(info, context);
            System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
            this.Tables.CollectionChanged += schemaChangedHandler;
            this.Relations.CollectionChanged += schemaChangedHandler;
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public ProfilerCollectorDataTable ProfilerCollector {
            get {
                return this.tableProfilerCollector;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EventsDataTable Events {
            get {
                return this.tableEvents;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EventTypeDataTable EventType {
            get {
                return this.tableEventType;
            }
        }
        
        [System.ComponentModel.Browsable(false)]
        [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
        public EventDataTable Event {
            get {
                return this.tableEvent;
            }
        }
        
        public override DataSet Clone() {
            dsProfiler cln = ((dsProfiler)(base.Clone()));
            cln.InitVars();
            return cln;
        }
        
        protected override bool ShouldSerializeTables() {
            return false;
        }
        
        protected override bool ShouldSerializeRelations() {
            return false;
        }
        
        protected override void ReadXmlSerializable(XmlReader reader) {
            this.Reset();
            DataSet ds = new DataSet();
            ds.ReadXml(reader);
            if ((ds.Tables["ProfilerCollector"] != null)) {
                this.Tables.Add(new ProfilerCollectorDataTable(ds.Tables["ProfilerCollector"]));
            }
            if ((ds.Tables["Events"] != null)) {
                this.Tables.Add(new EventsDataTable(ds.Tables["Events"]));
            }
            if ((ds.Tables["EventType"] != null)) {
                this.Tables.Add(new EventTypeDataTable(ds.Tables["EventType"]));
            }
            if ((ds.Tables["Event"] != null)) {
                this.Tables.Add(new EventDataTable(ds.Tables["Event"]));
            }
            this.DataSetName = ds.DataSetName;
            this.Prefix = ds.Prefix;
            this.Namespace = ds.Namespace;
            this.Locale = ds.Locale;
            this.CaseSensitive = ds.CaseSensitive;
            this.EnforceConstraints = ds.EnforceConstraints;
            this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
            this.InitVars();
        }
        
        protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            this.WriteXmlSchema(new XmlTextWriter(stream, null));
            stream.Position = 0;
            return System.Xml.Schema.XmlSchema.Read(new XmlTextReader(stream), null);
        }
        
        internal void InitVars() {
            this.tableProfilerCollector = ((ProfilerCollectorDataTable)(this.Tables["ProfilerCollector"]));
            if ((this.tableProfilerCollector != null)) {
                this.tableProfilerCollector.InitVars();
            }
            this.tableEvents = ((EventsDataTable)(this.Tables["Events"]));
            if ((this.tableEvents != null)) {
                this.tableEvents.InitVars();
            }
            this.tableEventType = ((EventTypeDataTable)(this.Tables["EventType"]));
            if ((this.tableEventType != null)) {
                this.tableEventType.InitVars();
            }
            this.tableEvent = ((EventDataTable)(this.Tables["Event"]));
            if ((this.tableEvent != null)) {
                this.tableEvent.InitVars();
            }
            this.relationEventType_Event = this.Relations["EventType_Event"];
            this.relationEvents_EventType = this.Relations["Events_EventType"];
            this.relationProfilerCollector_Events = this.Relations["ProfilerCollector_Events"];
        }
        
        private void InitClass() {
            this.DataSetName = "dsProfiler";
            this.Prefix = "";
            this.Namespace = "http://tempuri.org/pssdiag_trace_schema.xsd";
            this.Locale = new System.Globalization.CultureInfo("en-US");
            this.CaseSensitive = false;
            this.EnforceConstraints = false;
            this.tableProfilerCollector = new ProfilerCollectorDataTable();
            this.Tables.Add(this.tableProfilerCollector);
            this.tableEvents = new EventsDataTable();
            this.Tables.Add(this.tableEvents);
            this.tableEventType = new EventTypeDataTable();
            this.Tables.Add(this.tableEventType);
            this.tableEvent = new EventDataTable();
            this.Tables.Add(this.tableEvent);
            ForeignKeyConstraint fkc;
            fkc = new ForeignKeyConstraint("ProfilerCollector_Events", new DataColumn[] {
                        this.tableProfilerCollector.ProfilerCollector_IdColumn}, new DataColumn[] {
                        this.tableEvents.ProfilerCollector_IdColumn});
            this.tableEvents.Constraints.Add(fkc);
            fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
            fkc.DeleteRule = System.Data.Rule.Cascade;
            fkc.UpdateRule = System.Data.Rule.Cascade;
            fkc = new ForeignKeyConstraint("Events_EventType", new DataColumn[] {
                        this.tableEvents.Events_IdColumn}, new DataColumn[] {
                        this.tableEventType.Events_IdColumn});
            this.tableEventType.Constraints.Add(fkc);
            fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
            fkc.DeleteRule = System.Data.Rule.Cascade;
            fkc.UpdateRule = System.Data.Rule.Cascade;
            fkc = new ForeignKeyConstraint("EventType_Event", new DataColumn[] {
                        this.tableEventType.EventType_IdColumn}, new DataColumn[] {
                        this.tableEvent.EventType_IdColumn});
            this.tableEvent.Constraints.Add(fkc);
            fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
            fkc.DeleteRule = System.Data.Rule.Cascade;
            fkc.UpdateRule = System.Data.Rule.Cascade;
            this.relationEventType_Event = new DataRelation("EventType_Event", new DataColumn[] {
                        this.tableEventType.EventType_IdColumn}, new DataColumn[] {
                        this.tableEvent.EventType_IdColumn}, false);
            this.relationEventType_Event.Nested = true;
            this.Relations.Add(this.relationEventType_Event);
            this.relationEvents_EventType = new DataRelation("Events_EventType", new DataColumn[] {
                        this.tableEvents.Events_IdColumn}, new DataColumn[] {
                        this.tableEventType.Events_IdColumn}, false);
            this.relationEvents_EventType.Nested = true;
            this.Relations.Add(this.relationEvents_EventType);
            this.relationProfilerCollector_Events = new DataRelation("ProfilerCollector_Events", new DataColumn[] {
                        this.tableProfilerCollector.ProfilerCollector_IdColumn}, new DataColumn[] {
                        this.tableEvents.ProfilerCollector_IdColumn}, false);
            this.relationProfilerCollector_Events.Nested = true;
            this.Relations.Add(this.relationProfilerCollector_Events);
        }
        
        private bool ShouldSerializeProfilerCollector() {
            return false;
        }
        
        private bool ShouldSerializeEvents() {
            return false;
        }
        
        private bool ShouldSerializeEventType() {
            return false;
        }
        
        private bool ShouldSerializeEvent() {
            return false;
        }
        
        private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
            if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
                this.InitVars();
            }
        }
        
        public delegate void ProfilerCollectorRowChangeEventHandler(object sender, ProfilerCollectorRowChangeEvent e);
        
        public delegate void EventsRowChangeEventHandler(object sender, EventsRowChangeEvent e);
        
        public delegate void EventTypeRowChangeEventHandler(object sender, EventTypeRowChangeEvent e);
        
        public delegate void EventRowChangeEventHandler(object sender, EventRowChangeEvent e);
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ProfilerCollectorDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columntemplate;
            
            private DataColumn columnProfilerCollector_Id;
            
            internal ProfilerCollectorDataTable() : 
                    base("ProfilerCollector") {
                this.InitClass();
            }
            
            internal ProfilerCollectorDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn templateColumn {
                get {
                    return this.columntemplate;
                }
            }
            
            internal DataColumn ProfilerCollector_IdColumn {
                get {
                    return this.columnProfilerCollector_Id;
                }
            }
            
            public ProfilerCollectorRow this[int index] {
                get {
                    return ((ProfilerCollectorRow)(this.Rows[index]));
                }
            }
            
            public event ProfilerCollectorRowChangeEventHandler ProfilerCollectorRowChanged;
            
            public event ProfilerCollectorRowChangeEventHandler ProfilerCollectorRowChanging;
            
            public event ProfilerCollectorRowChangeEventHandler ProfilerCollectorRowDeleted;
            
            public event ProfilerCollectorRowChangeEventHandler ProfilerCollectorRowDeleting;
            
            public void AddProfilerCollectorRow(ProfilerCollectorRow row) {
                this.Rows.Add(row);
            }
            
            public ProfilerCollectorRow AddProfilerCollectorRow(string template) {
                ProfilerCollectorRow rowProfilerCollectorRow = ((ProfilerCollectorRow)(this.NewRow()));
                rowProfilerCollectorRow.ItemArray = new object[] {
                        template,
                        null};
                this.Rows.Add(rowProfilerCollectorRow);
                return rowProfilerCollectorRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                ProfilerCollectorDataTable cln = ((ProfilerCollectorDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new ProfilerCollectorDataTable();
            }
            
            internal void InitVars() {
                this.columntemplate = this.Columns["template"];
                this.columnProfilerCollector_Id = this.Columns["ProfilerCollector_Id"];
            }
            
            private void InitClass() {
                this.columntemplate = new DataColumn("template", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columntemplate);
                this.columnProfilerCollector_Id = new DataColumn("ProfilerCollector_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnProfilerCollector_Id);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnProfilerCollector_Id}, true));
                this.columntemplate.Namespace = "";
                this.columnProfilerCollector_Id.AutoIncrement = true;
                this.columnProfilerCollector_Id.AllowDBNull = false;
                this.columnProfilerCollector_Id.Unique = true;
            }
            
            public ProfilerCollectorRow NewProfilerCollectorRow() {
                return ((ProfilerCollectorRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new ProfilerCollectorRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(ProfilerCollectorRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.ProfilerCollectorRowChanged != null)) {
                    this.ProfilerCollectorRowChanged(this, new ProfilerCollectorRowChangeEvent(((ProfilerCollectorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.ProfilerCollectorRowChanging != null)) {
                    this.ProfilerCollectorRowChanging(this, new ProfilerCollectorRowChangeEvent(((ProfilerCollectorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.ProfilerCollectorRowDeleted != null)) {
                    this.ProfilerCollectorRowDeleted(this, new ProfilerCollectorRowChangeEvent(((ProfilerCollectorRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.ProfilerCollectorRowDeleting != null)) {
                    this.ProfilerCollectorRowDeleting(this, new ProfilerCollectorRowChangeEvent(((ProfilerCollectorRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveProfilerCollectorRow(ProfilerCollectorRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ProfilerCollectorRow : DataRow {
            
            private ProfilerCollectorDataTable tableProfilerCollector;
            
            internal ProfilerCollectorRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableProfilerCollector = ((ProfilerCollectorDataTable)(this.Table));
            }
            
            public string template {
                get {
                    try {
                        return ((string)(this[this.tableProfilerCollector.templateColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableProfilerCollector.templateColumn] = value;
                }
            }
            
            public bool IstemplateNull() {
                return this.IsNull(this.tableProfilerCollector.templateColumn);
            }
            
            public void SettemplateNull() {
                this[this.tableProfilerCollector.templateColumn] = System.Convert.DBNull;
            }
            
            public EventsRow[] GetEventsRows() {
                return ((EventsRow[])(this.GetChildRows(this.Table.ChildRelations["ProfilerCollector_Events"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class ProfilerCollectorRowChangeEvent : EventArgs {
            
            private ProfilerCollectorRow eventRow;
            
            private DataRowAction eventAction;
            
            public ProfilerCollectorRowChangeEvent(ProfilerCollectorRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public ProfilerCollectorRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventsDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnEvents_Id;
            
            private DataColumn columnProfilerCollector_Id;
            
            internal EventsDataTable() : 
                    base("Events") {
                this.InitClass();
            }
            
            internal EventsDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn Events_IdColumn {
                get {
                    return this.columnEvents_Id;
                }
            }
            
            internal DataColumn ProfilerCollector_IdColumn {
                get {
                    return this.columnProfilerCollector_Id;
                }
            }
            
            public EventsRow this[int index] {
                get {
                    return ((EventsRow)(this.Rows[index]));
                }
            }
            
            public event EventsRowChangeEventHandler EventsRowChanged;
            
            public event EventsRowChangeEventHandler EventsRowChanging;
            
            public event EventsRowChangeEventHandler EventsRowDeleted;
            
            public event EventsRowChangeEventHandler EventsRowDeleting;
            
            public void AddEventsRow(EventsRow row) {
                this.Rows.Add(row);
            }
            
            public EventsRow AddEventsRow(ProfilerCollectorRow parentProfilerCollectorRowByProfilerCollector_Events) {
                EventsRow rowEventsRow = ((EventsRow)(this.NewRow()));
                rowEventsRow.ItemArray = new object[] {
                        null,
                        parentProfilerCollectorRowByProfilerCollector_Events[1]};
                this.Rows.Add(rowEventsRow);
                return rowEventsRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                EventsDataTable cln = ((EventsDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new EventsDataTable();
            }
            
            internal void InitVars() {
                this.columnEvents_Id = this.Columns["Events_Id"];
                this.columnProfilerCollector_Id = this.Columns["ProfilerCollector_Id"];
            }
            
            private void InitClass() {
                this.columnEvents_Id = new DataColumn("Events_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnEvents_Id);
                this.columnProfilerCollector_Id = new DataColumn("ProfilerCollector_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnProfilerCollector_Id);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnEvents_Id}, true));
                this.columnEvents_Id.AutoIncrement = true;
                this.columnEvents_Id.AllowDBNull = false;
                this.columnEvents_Id.Unique = true;
            }
            
            public EventsRow NewEventsRow() {
                return ((EventsRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new EventsRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EventsRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EventsRowChanged != null)) {
                    this.EventsRowChanged(this, new EventsRowChangeEvent(((EventsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EventsRowChanging != null)) {
                    this.EventsRowChanging(this, new EventsRowChangeEvent(((EventsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EventsRowDeleted != null)) {
                    this.EventsRowDeleted(this, new EventsRowChangeEvent(((EventsRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EventsRowDeleting != null)) {
                    this.EventsRowDeleting(this, new EventsRowChangeEvent(((EventsRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEventsRow(EventsRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventsRow : DataRow {
            
            private EventsDataTable tableEvents;
            
            internal EventsRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableEvents = ((EventsDataTable)(this.Table));
            }
            
            public ProfilerCollectorRow ProfilerCollectorRow {
                get {
                    return ((ProfilerCollectorRow)(this.GetParentRow(this.Table.ParentRelations["ProfilerCollector_Events"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["ProfilerCollector_Events"]);
                }
            }
            
            public EventTypeRow[] GetEventTypeRows() {
                return ((EventTypeRow[])(this.GetChildRows(this.Table.ChildRelations["Events_EventType"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventsRowChangeEvent : EventArgs {
            
            private EventsRow eventRow;
            
            private DataRowAction eventAction;
            
            public EventsRowChangeEvent(EventsRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EventsRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventTypeDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnname;
            
            private DataColumn columnenabled;
            
            private DataColumn columnEventType_Id;
            
            private DataColumn columnEvents_Id;
            
            internal EventTypeDataTable() : 
                    base("EventType") {
                this.InitClass();
            }
            
            internal EventTypeDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn nameColumn {
                get {
                    return this.columnname;
                }
            }
            
            internal DataColumn enabledColumn {
                get {
                    return this.columnenabled;
                }
            }
            
            internal DataColumn EventType_IdColumn {
                get {
                    return this.columnEventType_Id;
                }
            }
            
            internal DataColumn Events_IdColumn {
                get {
                    return this.columnEvents_Id;
                }
            }
            
            public EventTypeRow this[int index] {
                get {
                    return ((EventTypeRow)(this.Rows[index]));
                }
            }
            
            public event EventTypeRowChangeEventHandler EventTypeRowChanged;
            
            public event EventTypeRowChangeEventHandler EventTypeRowChanging;
            
            public event EventTypeRowChangeEventHandler EventTypeRowDeleted;
            
            public event EventTypeRowChangeEventHandler EventTypeRowDeleting;
            
            public void AddEventTypeRow(EventTypeRow row) {
                this.Rows.Add(row);
            }
            
            public EventTypeRow AddEventTypeRow(string name, bool enabled, EventsRow parentEventsRowByEvents_EventType) {
                EventTypeRow rowEventTypeRow = ((EventTypeRow)(this.NewRow()));
                rowEventTypeRow.ItemArray = new object[] {
                        name,
                        enabled,
                        null,
                        parentEventsRowByEvents_EventType[0]};
                this.Rows.Add(rowEventTypeRow);
                return rowEventTypeRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                EventTypeDataTable cln = ((EventTypeDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new EventTypeDataTable();
            }
            
            internal void InitVars() {
                this.columnname = this.Columns["name"];
                this.columnenabled = this.Columns["enabled"];
                this.columnEventType_Id = this.Columns["EventType_Id"];
                this.columnEvents_Id = this.Columns["Events_Id"];
            }
            
            private void InitClass() {
                this.columnname = new DataColumn("name", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnname);
                this.columnenabled = new DataColumn("enabled", typeof(bool), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnenabled);
                this.columnEventType_Id = new DataColumn("EventType_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnEventType_Id);
                this.columnEvents_Id = new DataColumn("Events_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnEvents_Id);
                this.Constraints.Add(new UniqueConstraint("Constraint1", new DataColumn[] {
                                this.columnEventType_Id}, true));
                this.columnname.Namespace = "";
                this.columnenabled.Namespace = "";
                this.columnEventType_Id.AutoIncrement = true;
                this.columnEventType_Id.AllowDBNull = false;
                this.columnEventType_Id.Unique = true;
            }
            
            public EventTypeRow NewEventTypeRow() {
                return ((EventTypeRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new EventTypeRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EventTypeRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EventTypeRowChanged != null)) {
                    this.EventTypeRowChanged(this, new EventTypeRowChangeEvent(((EventTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EventTypeRowChanging != null)) {
                    this.EventTypeRowChanging(this, new EventTypeRowChangeEvent(((EventTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EventTypeRowDeleted != null)) {
                    this.EventTypeRowDeleted(this, new EventTypeRowChangeEvent(((EventTypeRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EventTypeRowDeleting != null)) {
                    this.EventTypeRowDeleting(this, new EventTypeRowChangeEvent(((EventTypeRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEventTypeRow(EventTypeRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventTypeRow : DataRow {
            
            private EventTypeDataTable tableEventType;
            
            internal EventTypeRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableEventType = ((EventTypeDataTable)(this.Table));
            }
            
            public string name {
                get {
                    try {
                        return ((string)(this[this.tableEventType.nameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEventType.nameColumn] = value;
                }
            }
            
            public bool enabled {
                get {
                    try {
                        return ((bool)(this[this.tableEventType.enabledColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEventType.enabledColumn] = value;
                }
            }
            
            public EventsRow EventsRow {
                get {
                    return ((EventsRow)(this.GetParentRow(this.Table.ParentRelations["Events_EventType"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["Events_EventType"]);
                }
            }
            
            public bool IsnameNull() {
                return this.IsNull(this.tableEventType.nameColumn);
            }
            
            public void SetnameNull() {
                this[this.tableEventType.nameColumn] = System.Convert.DBNull;
            }
            
            public bool IsenabledNull() {
                return this.IsNull(this.tableEventType.enabledColumn);
            }
            
            public void SetenabledNull() {
                this[this.tableEventType.enabledColumn] = System.Convert.DBNull;
            }
            
            public EventRow[] GetEventRows() {
                return ((EventRow[])(this.GetChildRows(this.Table.ChildRelations["EventType_Event"])));
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventTypeRowChangeEvent : EventArgs {
            
            private EventTypeRow eventRow;
            
            private DataRowAction eventAction;
            
            public EventTypeRowChangeEvent(EventTypeRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EventTypeRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventDataTable : DataTable, System.Collections.IEnumerable {
            
            private DataColumn columnid;
            
            private DataColumn columnname;
            
            private DataColumn columnenabled;
            
            private DataColumn columndescription;
            
            private DataColumn columnEventType_Id;
            
            internal EventDataTable() : 
                    base("Event") {
                this.InitClass();
            }
            
            internal EventDataTable(DataTable table) : 
                    base(table.TableName) {
                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
                    this.CaseSensitive = table.CaseSensitive;
                }
                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
                    this.Locale = table.Locale;
                }
                if ((table.Namespace != table.DataSet.Namespace)) {
                    this.Namespace = table.Namespace;
                }
                this.Prefix = table.Prefix;
                this.MinimumCapacity = table.MinimumCapacity;
                this.DisplayExpression = table.DisplayExpression;
            }
            
            [System.ComponentModel.Browsable(false)]
            public int Count {
                get {
                    return this.Rows.Count;
                }
            }
            
            internal DataColumn idColumn {
                get {
                    return this.columnid;
                }
            }
            
            internal DataColumn nameColumn {
                get {
                    return this.columnname;
                }
            }
            
            internal DataColumn enabledColumn {
                get {
                    return this.columnenabled;
                }
            }
            
            internal DataColumn descriptionColumn {
                get {
                    return this.columndescription;
                }
            }
            
            internal DataColumn EventType_IdColumn {
                get {
                    return this.columnEventType_Id;
                }
            }
            
            public EventRow this[int index] {
                get {
                    return ((EventRow)(this.Rows[index]));
                }
            }
            
            public event EventRowChangeEventHandler EventRowChanged;
            
            public event EventRowChangeEventHandler EventRowChanging;
            
            public event EventRowChangeEventHandler EventRowDeleted;
            
            public event EventRowChangeEventHandler EventRowDeleting;
            
            public void AddEventRow(EventRow row) {
                this.Rows.Add(row);
            }
            
            public EventRow AddEventRow(int id, string name, bool enabled, string description, EventTypeRow parentEventTypeRowByEventType_Event) {
                EventRow rowEventRow = ((EventRow)(this.NewRow()));
                rowEventRow.ItemArray = new object[] {
                        id,
                        name,
                        enabled,
                        description,
                        parentEventTypeRowByEventType_Event[2]};
                this.Rows.Add(rowEventRow);
                return rowEventRow;
            }
            
            public System.Collections.IEnumerator GetEnumerator() {
                return this.Rows.GetEnumerator();
            }
            
            public override DataTable Clone() {
                EventDataTable cln = ((EventDataTable)(base.Clone()));
                cln.InitVars();
                return cln;
            }
            
            protected override DataTable CreateInstance() {
                return new EventDataTable();
            }
            
            internal void InitVars() {
                this.columnid = this.Columns["id"];
                this.columnname = this.Columns["name"];
                this.columnenabled = this.Columns["enabled"];
                this.columndescription = this.Columns["description"];
                this.columnEventType_Id = this.Columns["EventType_Id"];
            }
            
            private void InitClass() {
                this.columnid = new DataColumn("id", typeof(int), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnid);
                this.columnname = new DataColumn("name", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnname);
                this.columnenabled = new DataColumn("enabled", typeof(bool), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columnenabled);
                this.columndescription = new DataColumn("description", typeof(string), null, System.Data.MappingType.Attribute);
                this.Columns.Add(this.columndescription);
                this.columnEventType_Id = new DataColumn("EventType_Id", typeof(int), null, System.Data.MappingType.Hidden);
                this.Columns.Add(this.columnEventType_Id);
                this.columnid.Namespace = "";
                this.columnname.Namespace = "";
                this.columnenabled.Namespace = "";
                this.columndescription.Namespace = "";
            }
            
            public EventRow NewEventRow() {
                return ((EventRow)(this.NewRow()));
            }
            
            protected override DataRow NewRowFromBuilder(DataRowBuilder builder) {
                return new EventRow(builder);
            }
            
            protected override System.Type GetRowType() {
                return typeof(EventRow);
            }
            
            protected override void OnRowChanged(DataRowChangeEventArgs e) {
                base.OnRowChanged(e);
                if ((this.EventRowChanged != null)) {
                    this.EventRowChanged(this, new EventRowChangeEvent(((EventRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowChanging(DataRowChangeEventArgs e) {
                base.OnRowChanging(e);
                if ((this.EventRowChanging != null)) {
                    this.EventRowChanging(this, new EventRowChangeEvent(((EventRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleted(DataRowChangeEventArgs e) {
                base.OnRowDeleted(e);
                if ((this.EventRowDeleted != null)) {
                    this.EventRowDeleted(this, new EventRowChangeEvent(((EventRow)(e.Row)), e.Action));
                }
            }
            
            protected override void OnRowDeleting(DataRowChangeEventArgs e) {
                base.OnRowDeleting(e);
                if ((this.EventRowDeleting != null)) {
                    this.EventRowDeleting(this, new EventRowChangeEvent(((EventRow)(e.Row)), e.Action));
                }
            }
            
            public void RemoveEventRow(EventRow row) {
                this.Rows.Remove(row);
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventRow : DataRow {
            
            private EventDataTable tableEvent;
            
            internal EventRow(DataRowBuilder rb) : 
                    base(rb) {
                this.tableEvent = ((EventDataTable)(this.Table));
            }
            
            public int id {
                get {
                    try {
                        return ((int)(this[this.tableEvent.idColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEvent.idColumn] = value;
                }
            }
            
            public string name {
                get {
                    try {
                        return ((string)(this[this.tableEvent.nameColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEvent.nameColumn] = value;
                }
            }
            
            public bool enabled {
                get {
                    try {
                        return ((bool)(this[this.tableEvent.enabledColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEvent.enabledColumn] = value;
                }
            }
            
            public string description {
                get {
                    try {
                        return ((string)(this[this.tableEvent.descriptionColumn]));
                    }
                    catch (InvalidCastException e) {
                        throw new StrongTypingException("Cannot get value because it is DBNull.", e);
                    }
                }
                set {
                    this[this.tableEvent.descriptionColumn] = value;
                }
            }
            
            public EventTypeRow EventTypeRow {
                get {
                    return ((EventTypeRow)(this.GetParentRow(this.Table.ParentRelations["EventType_Event"])));
                }
                set {
                    this.SetParentRow(value, this.Table.ParentRelations["EventType_Event"]);
                }
            }
            
            public bool IsidNull() {
                return this.IsNull(this.tableEvent.idColumn);
            }
            
            public void SetidNull() {
                this[this.tableEvent.idColumn] = System.Convert.DBNull;
            }
            
            public bool IsnameNull() {
                return this.IsNull(this.tableEvent.nameColumn);
            }
            
            public void SetnameNull() {
                this[this.tableEvent.nameColumn] = System.Convert.DBNull;
            }
            
            public bool IsenabledNull() {
                return this.IsNull(this.tableEvent.enabledColumn);
            }
            
            public void SetenabledNull() {
                this[this.tableEvent.enabledColumn] = System.Convert.DBNull;
            }
            
            public bool IsdescriptionNull() {
                return this.IsNull(this.tableEvent.descriptionColumn);
            }
            
            public void SetdescriptionNull() {
                this[this.tableEvent.descriptionColumn] = System.Convert.DBNull;
            }
        }
        
        [System.Diagnostics.DebuggerStepThrough()]
        public class EventRowChangeEvent : EventArgs {
            
            private EventRow eventRow;
            
            private DataRowAction eventAction;
            
            public EventRowChangeEvent(EventRow row, DataRowAction action) {
                this.eventRow = row;
                this.eventAction = action;
            }
            
            public EventRow Row {
                get {
                    return this.eventRow;
                }
            }
            
            public DataRowAction Action {
                get {
                    return this.eventAction;
                }
            }
        }
    }
}
